package com.zbkj.common.model.card;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 礼品卡管理
 *
 * @author Swallows
 * @date 2022-08-15 11:23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_store_card_manage")
@ApiModel(value="礼品卡发卡管理实体对象", description="礼品卡发卡管理表")
public class StoreGiftCardUser implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "礼品卡发布id")
    private Integer cardId;

    @ApiModelProperty(value = "礼品卡类型 1 电子卡 2 实体卡")
    private Integer cardType;

    @ApiModelProperty(value = "兑换的项目id")
    private Integer cid;

    @ApiModelProperty("卡号")
    private String cardNum;

    @ApiModelProperty("密码")
    private String pass;

    @ApiModelProperty(value = "卡片归属人id")
    private Integer belongId;

    @ApiModelProperty("发卡操作人id")
    private Integer operId;

    @ApiModelProperty(value = "领取人id")
    private Integer uid;

    @ApiModelProperty(value = "礼品卡名称")
    private String name;

    @ApiModelProperty(value = "礼品卡的面值")
    private BigDecimal money;

    @ApiModelProperty(value = "礼品卡背景图 主要用于电子卡展示")
    private String image;

    @ApiModelProperty(value = "获取方式，send后台发放, vip 成为会员赠送, exchange 兑换")
    private String type;

    @ApiModelProperty(value = "状态（0：未使用，1：已使用, 2:已过期）")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "开始使用时间")
    private Date startTime;

    @ApiModelProperty(value = "过期时间")
    private Date endTime;

    @ApiModelProperty(value = "使用时间")
    private Date useTime;

    @ApiModelProperty(value = "使用类型 1 储值卡, 2 指定商品卡, 3 指定品类卡")
    private Integer useType;

    @ApiModelProperty(value = "主键id 商品id/分类id", required = true)
    private String primaryKey;

    @ApiModelProperty(value = "领取状态 0 未发卡 1 可转赠/待使用 2 待领取 3 已领取")
    private Integer receiveStatus;

    @ApiModelProperty("领取时间")
    private Date receiveTime;

    @ApiModelProperty(value = "赠卡领取过期时间")
    private Date expiredTime;
}
